home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Musik / Misc / Amster / Install_Amster < prev    next >
Encoding:
Text File  |  2000-05-27  |  4.2 KB  |  204 lines

  1. ; $VER: Install_Amster 0.6 (13.5.2000)
  2.  
  3. (procedure P_check-system-version
  4.     (set #exec-version (/ (getversion) 65536))
  5.     (if (< #exec-version 39)
  6.         (abort "Amster needs Kickstart 3.0 or higher.\n")
  7.     )
  8.  
  9.     (set #mui-version (/ (getversion "LIBS:muimaster.library") 65536))
  10.     (if (< #mui-version 19)
  11.         (abort "Amster needs MUI 3.8+.\n")
  12.     )
  13.  
  14.     (set #nlist-version (/ (getversion "LIBS:MUI/NList.mcc") 65536))
  15.     (if (< #nlist-version 19)
  16.         (abort "Amster needs MCC_NList 19.x+\n")
  17.     )
  18.  
  19.     (set #lamp-version (/ (getversion "LIBS:MUI/Lamp.mcc") 65536))
  20.     (if (< #lamp-version 11)
  21.         (abort "Amster needs MCC_Lamp 11.x+\n")
  22.     )
  23. )
  24.  
  25. (procedure P_select-destination-directory
  26.     (if (exists "Work:" (noreq))
  27.         (set @default-dest "Work:")
  28.     (set @default-dest "SYS:")
  29.     )
  30.  
  31.     (set @default-dest
  32.         (askdir
  33.             (prompt "Select the directory where you want to install Amster. A new directory will be created.")
  34.             (help "No help available.")
  35.             (default @default-dest)
  36.         )
  37.     )
  38.     (set @default-dest (tackon @default-dest "Amster/"))
  39. )
  40.  
  41. (procedure P_select-languages
  42.     (set #catalog 19)
  43.     (set #n 0)
  44.     (while (set #thislang (select #n
  45.         "català" "czech" "dansk" "nederlands" "suomi"
  46.         "français" "deutsch" "magyar" "italiano" "norsk" "português"
  47.         "russian" "slovenian" "español" "svenska" ""))
  48.         (
  49.             (if (= @language #thislang) (set #catalog #n))
  50.             (set #n (+ #n 1))
  51.         )
  52.     )
  53.  
  54.     (set #n 0)
  55.     (set #catalogs 1)
  56.     (until (= #n #catalog)
  57.         (set #catalogs (* #catalogs 2))
  58.         (set #n (+ #n 1))
  59.     )
  60.  
  61.     (if (= @user-level 2)
  62.         (set #catalogs
  63.             (askoptions
  64.                 (prompt "Select the languages you want to install.")
  65.                 (help "Checkmark the languages you want to install, and click 'Proceed'.")
  66.                 (choices
  67.                     "Catalan" "Czech" "Danish" "Dutch" "Finnish"
  68.                     "French" "German" "Hungarian" "Italian" "Norwegian" "Portuguese"
  69.                     "Russian" "Slovenian" "Spanish" "Swedish")
  70.                 (default #catalogs)
  71.             )
  72.         )
  73.     )
  74.  
  75.     (if (> #catalogs 0)
  76.         (makedir (tackon @default-dest "Catalogs/"))
  77.     )
  78.  
  79.     (set #n 0)
  80.     (while (set #thislang (select #n
  81.         "català" "czech" "dansk" "nederlands" "suomi"
  82.         "français" "deutsch" "magyar" "italiano" "norsk" "português"
  83.         "russian" "slovensko" "español" "svenska" ""))
  84.         (
  85.             (if (IN #catalogs #n)
  86.                 (copyfiles
  87.                     (source (tackon #source-dir (cat "Catalogs/" #thislang "/Amster.catalog")))
  88.                     (dest (tackon @default-dest (cat "Catalogs/" #thislang)))
  89.                 )
  90.             )
  91.             (set #n (+ #n 1))
  92.         )
  93.     )
  94. )
  95.  
  96. (procedure P_copy-sources
  97.     (if (= @user-level 2)
  98.         (
  99.             (set #copy-source
  100.                 (askchoice
  101.                     (help @askchoice-help)
  102.                     (prompt "Do you want to install sources?")
  103.                     (choices "Yes" "No")
  104.                     (default 1)
  105.                 )
  106.             )
  107.  
  108.             (if (= #copy-source 0)
  109.                 (
  110.                     (set #SourceDir (tackon @default-dest "Source"))
  111.                     (if (not (exists #SourceDir)) (makedir #SourceDir))
  112.                     (copyfiles
  113.                         (source (tackon #source-dir "Source/"))
  114.                         (dest #SourceDir)
  115.                         (all)
  116.                     )
  117.                 )
  118.             )
  119.         )
  120.     )
  121. )
  122.  
  123. (welcome "Welcome to the Amster 0.6 installation.\n")
  124.  
  125. (set @app-name "Amster 0.6")
  126.  
  127. (P_check-system-version)
  128.  
  129. (complete 0)
  130.  
  131. (set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon))
  132.     (expandpath @icon))
  133. )
  134.  
  135. (P_select-destination-directory)
  136.  
  137. (complete 10)
  138.  
  139. (makedir @default-dest (infos))
  140.  
  141. (complete 20)
  142.  
  143. (P_select-languages)
  144.  
  145. (complete 30)
  146.  
  147. ; Copy program file and documentation
  148.  
  149. (copyfiles
  150.     (help @copyfiles-help)
  151.     (prompt "Install program and documentation.")
  152.     (confirm)
  153.     (source #source-dir)
  154.     (dest @default-dest)
  155.     (pattern "(README|COPYING|Amster)(|.guide)(|.info)(|.servers)")
  156.     (noposition)
  157. )
  158.  
  159. (complete 50)
  160.  
  161. ; Copy ARexx scripts
  162.  
  163. (set #RexxDir (tackon @default-dest "Rexx"))
  164. (if (not (exists #RexxDir)) (makedir #RexxDir))
  165. (copyfiles
  166.     (help @copyfiles-help)
  167.     (prompt "Select the ARexx scripts you want to install.")
  168.     (confirm)
  169.     (source (tackon #source-dir "Rexx/"))
  170.     (dest #RexxDir)
  171.     (all)
  172. )
  173.  
  174. (complete 60)
  175.  
  176. ; Copy icons
  177.  
  178. (set #IconDir (tackon @default-dest "Icons"))
  179. (if (not (exists #IconDir)) (makedir #IconDir))
  180. (copyfiles
  181.     (help @copyfiles-help)
  182.     (prompt "Select the icons you want to install.")
  183.     (confirm)
  184.     (source (tackon #source-dir "Icons/"))
  185.     (dest #IconDir)
  186.     (all)
  187. )
  188.  
  189. (complete 70)
  190.  
  191. (P_copy-sources)
  192.  
  193. (complete 90)
  194.  
  195. ; Show README
  196.  
  197. ;(showmedia 'media' "README" 'upper_left' 'medium' 1)
  198.  
  199. (complete 100)
  200.  
  201. (exit "The installation of Amster is finished.")
  202.  
  203. (closemedia media)
  204.